<template>
    <div class="container">
        <div v-for="chapter in data">
            <ChapterItem :data="chapter" :old_data="data" ></ChapterItem>
        </div>
    </div>
</template>

<script setup>
import ChapterItem from '@c/preview-item/chapter.vue';
import { onMounted, ref } from 'vue-demi';
import router from '../../../../route';
import store from '../../../../store';
import { switchEmptyByData } from '../../../../utils/utils';
// const props = defineProps(['data'])
let data = ref()
onMounted(async () =>{
    data.value = await store.state.router_data.get()    
})
// let data = await store.state.router_data.get()
// let data = store.state.router.data
// let params =  router.currentRoute.value.params
// console.log('chapter页面的路由参数', params)
</script>

<style scoped>

.container{
    flex-wrap: wrap;
    display: flex;
}

</style>